home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 8825 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.9 KB

  1. Path: news.unt.edu!news
  2. From: Steve Fogoros <sfogoros@hsc.unt.edu>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Fractals
  5. Date: Wed, 06 Mar 1996 09:40:54 -0800
  6. Organization: University of North Texas Health Science Center
  7. Message-ID: <313DCE26.6F0F@hsc.unt.edu>
  8. References: <4hhv43$49i@sunburst.ccs.yorku.ca> <4hibr0INN7s1@gambier.ugrad.cs.ubc.ca> <313D1AF1.4A22@hsc.unt.edu> <4hjm6pINN44r@keats.ugrad.cs.ubc.ca>
  9. NNTP-Posting-Host: sfogoros.hsc.unt.edu
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (Win16; I)
  14.  
  15. Kazimir Kylheku wrote:
  16.  
  17. > ...
  18. >
  19. >  >>
  20. >  >> Then you compute the fractal using whatever iterative formula you wish, such as
  21. >  >>
  22. >  >>         z = z^2 + C
  23. >  >
  24. >  >When you used the ^ symbol, did you intend to indicate 2 as an exponent of z or bitwise exclusive or?
  25. > Exponent, sorry. That was not intended to be a C statement. (And in fact it
  26. > could not be, since C does not let you overload operators to support a complex
  27. > type that way).
  28. > By the way, what would be the meaning of doing an XOR between a floating point
  29. > complex number and 2?
  30.  
  31. Ok, I knew that XOR would be illogical in this context because of the complex number. I should have posed 
  32. a real question instead of just pointing out use of a C bitwise operator in a math expression illustrating 
  33. exponentiation (I'm sorry about that).
  34.  
  35. The question is regarding the correct, standard, and generally accepted forms of writing exponentiation in 
  36. C code and in documentation. I've seen z**2 in documentation that I always interpreted as exponentiation. 
  37. And, I know that the BASIC language has the exponent operator ^. I have avoided using ^ in the past 
  38. because of these variations. I am interested in your opinion on this topic. Uh-Oh, did I turn this RE: 
  39. Fractals into something that should be posted with a different subject?
  40.  
  41. -- 
  42. Steve Fogoros, Academic Information Coordinator
  43. University of North Texas Health Science Center
  44. sfogoros@hsc.unt.edu
  45.